home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 36
/
q36.d81
/
t.star boot 2
< prev
next >
Wrap
Text File
|
2022-08-28
|
17KB
|
331 lines
S T A R B O O T
Part Two
H) Kill/Restore Boot Sector
---------------------------
Sometimes there may be times when you don't want an Autobooting disk to
Autoboot. It happens to me all the time when I want a directory and press
the reset button to clear out an old program. Instead of constantly either
pulling the disk out during the autoboot sequence or turning off the drive
to avoid the autobooting, now all you have to do is kill the sector and it
won't autoboot anymore.
For those of you who don't know how a disk becomes an Autobooting disk,
just check out Track 1, Sector 0. If the first 3 characters in that sector
show 'CBM', then it will Autoboot according to the code that follows.
Normally, what follows is the actual message that will be displayed during
an Autoboot, and then following that, the command that is used to actually
load and run a file. To kill the autoboot, all the program does is change
the 'CBM' to a computer that us 'commies' have to put up with in this
Gatesian world... namely 'IBM'. Just a little computer humor! Actually you
can change it manually to anything you want if you have a sector editor.
When killing the sector, it will NOT De-Allocate the sector, so it
shouldn't be disturbed on future saves. This also lets you 'Restore' the
Boot sector without worrying about the sector getting destroyed.
I) Write String To Any Sector
-----------------------------
This is an Option that you have to use VERY CAREFULLY as it can
overwrite any data on any sector of the disk. It will prompt you for the
Track, Sector, String, and Byte Position. Track and sector is just that,
the track and sector that you want to write to. String is the text
information that you want to write. Byte Position is the starting Byte on
your selected track and sector. Please note that the bytes are numbered 0-
255 on each sector. NOT 1-256. The program will calculate the length of
your string and add it to the starting byte position and if that number is
higher than 255, this means that the string can not be written, as it would
have to write to another sector to finish the string. In that case,
decrease the length of your string or set the byte position lower.
This is about the only check that the program does, besides the normal
checks for drive and disk types. The main reason I included this option is
to re-write text on any sector without having to load the program itself. I
also wanted to be able to change text in a Machine Language program without
using an assembler. I suggest you use Option 'F' (Scan Disk Contents) on a
sector that you plan on writing to to make sure of the length and starting
byte position. The program will even ask you TWICE before writing to the
disk, just to give you ample warning to back out.
Another use of this option has to do with the last sector of a saved
program. As you might know already, most of the time not all of the bytes
in the last sector are used, but the whole sector will still be saved. For
example, use Option 'E' (File Tracer) on a couple of files that you know
are BASIC programs and note the last Track and Sector used, along with the
number of bytes used in the last sector. Then use Option 'F' (Scan Disk
Contents) on that sector and look for the 3 '@' (AT sign) symbols in a row.
The third AT should be on the byte position that the file tracer told you
was the last byte used. From the NEXT position to the end of the sector
(byte #255) is free for you to use as you want. Just remember if you load
the program and add something to it, then re-save it, it will use more of
that sector, or possibly use all of it and even go on to more sectors if
needed. Again, experiment on an unimportant disk to get the hang of it.
Native mode partitions are Not supported on this Option.
J) Allocate/De-Allocate Sector
------------------------------
This will let you Allocate or De-Allocate any sector on the disk
regardless if the sector is used by a file or not. It will stay that way
until you Validate the disk. Then if the sector that you allocated is not
used by any file, the validation will de-allocate it. And a sector that you
De-allocate will be allocated if it is used by a file. NOTE: If you try to
Allocate a sector that is already allocated, the program will appear to
lock-up, BUT IT DIDN'T. It will be searching for the next higher sector
that is free, and sometimes it might take a while. This is not my doing,
but is automatic with the Block-Allocate B-A command. Native mode
partitions are Not supported (yet).
K) Sectors Free By Track Number
-------------------------------
This Option is a shorter version of Option 'L' (Block Availability
Map). After getting some data from the directory Track, it'll display each
Track number along with the number of Sectors FREE for that track. A '0'
means that all sectors of that track is used. 1541 disks will display
Tracks 1-35 and 1571 disks will display Tracks 1-70. 1581 disks will
display Tracks 1-80. As you might have guessed, this Option does Not
support the infamous Native mode partitions.
L) Block Availability Map (BAM)
-------------------------------
This will display a full-screen chart of all sectors telling you if
they are Free (O) or Used (X). The Track numbers are displayed going
horizontally across the top of the screen and the Sector numbers are on the
left side going vertically. The display will stop after displaying the
first 35 Tracks if you have a 1541 drive and/or a Single sided disk. On the
higher Tracks, you will notice that the higher sectors are marked with a '-
' (hyphen), meaning that the sector is unavailable for that track.
Displaying the BAM for 1581 disks are different than above. Because
1581 disks use 80 tracks with 40 sectors in each track, there was no way to
display all the information on one screen. So the chart is flipped over and
displayed 1 track's worth per row. After a while, it will also scroll, but
is displayed slow enough to look at all the information. From left to
right, it will display the Track number, Sectors free in the track, and
then the BAM for all 40 sectors displaying either X or O. The Block
Allocation Map will give you a better understanding in how the disk drive
stores its information on the disks.
Due to the fact that the Native mode uses 255 Tracks with 255 Sectors
in each Track, and the fact that the Bam is not uniform, this Option does
Not support the Native mode partitions. Maybe after I learn much more about
them, I will be able to come up with something for a future version of STAR
BOOT.
M) Validate Disk (Safely)
-------------------------
What exactly does 'Safely' mean? Well, it has to do with the Boot
Sector again. Boot Sectors are normally just 'there' and has no file
associated with it, so a validation will De-allocate the sector and any
other disk saves will possibly over-write it, making it not Autoboot
anymore. This option will do a normal validation of the disk, but then
check to see if the Boot sector has the symbols 'CBM' (autobootable) or
'IBM' (killed boot), and if so, will Re-Allocate the sector. This can be
done elsewhere in two steps, but this option makes it easy and automatic. I
like easy better! Since Native mode partitions never use Track 1 Sector 0
for file storage, this Option can be used to Validate anything, even a
Native mode partition.
N) Send Disk Commands
---------------------
This will let you send a disk command to the current device that is
shown at the top of the Main Menu screen next to Device. The command string
that you type in is what is normally inserted inside the quotes of the
following line:
OPEN 15,DV,15 : PRINT #15, "command" : CLOSE15
Examples Type
-------- ----
Initialize Disk Drive I
Validate Disk (Unsafely) V
Change Partition on CMD devices CPx x=partition number
Format A Disk N:filename,id
Empty A Disk N:filename
Read the Error Channel